import pymysql

conn = pymysql.connect(user='root', password='mypassword', database='hitech', charset='utf8')
cursor = conn.cursor()
query = ('select * from sys_user')
cursor.execute(query)
for x in cursor:
    print(x)
cursor.close()
conn.close()